From: Keir Fraser Date: Fri, 9 Jul 2010 14:39:35 +0000 (+0100) Subject: iommu: Remove pointless iommu=pv boot option. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11812 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52b8c95eaed13358f8069ccaf8739a2414b2b9cf;p=xen.git iommu: Remove pointless iommu=pv boot option. Allow devices to always be passed through to PV domains, just as they can be to HVM domains. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/ia64/xen/dom0_ops.c b/xen/arch/ia64/xen/dom0_ops.c index 499eed5615..6c44cc8e53 100644 --- a/xen/arch/ia64/xen/dom0_ops.c +++ b/xen/arch/ia64/xen/dom0_ops.c @@ -339,12 +339,6 @@ long arch_do_domctl(xen_domctl_t *op, XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) bus = (op->u.assign_device.machine_bdf >> 16) & 0xff; devfn = (op->u.assign_device.machine_bdf >> 8) & 0xff; - if ( !iommu_pv_enabled && !is_hvm_domain(d) ) - { - ret = -ENOSYS; - break; - } - if ( device_assigned(bus, devfn) ) { gdprintk(XENLOG_ERR, "XEN_DOMCTL_assign_device: " @@ -381,12 +375,6 @@ long arch_do_domctl(xen_domctl_t *op, XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) bus = (op->u.assign_device.machine_bdf >> 16) & 0xff; devfn = (op->u.assign_device.machine_bdf >> 8) & 0xff; - if ( !iommu_pv_enabled && !is_hvm_domain(d) ) - { - ret = -ENOSYS; - break; - } - if ( !device_assigned(bus, devfn) ) break; diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index e598936035..070ff39f36 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -841,12 +841,6 @@ long arch_do_domctl( bus = (domctl->u.assign_device.machine_bdf >> 16) & 0xff; devfn = (domctl->u.assign_device.machine_bdf >> 8) & 0xff; - if ( !iommu_pv_enabled && !is_hvm_domain(d) ) - { - ret = -ENOSYS; - goto assign_device_out; - } - ret = assign_device(d, bus, devfn); if ( ret ) gdprintk(XENLOG_ERR, "XEN_DOMCTL_assign_device: " @@ -882,11 +876,6 @@ long arch_do_domctl( bus = (domctl->u.assign_device.machine_bdf >> 16) & 0xff; devfn = (domctl->u.assign_device.machine_bdf >> 8) & 0xff; - if ( !iommu_pv_enabled && !is_hvm_domain(d) ) - { - ret = -ENOSYS; - goto deassign_device_out; - } spin_lock(&pcidevs_lock); ret = deassign_device(d, bus, devfn); spin_unlock(&pcidevs_lock); diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 732618cc83..b592800a19 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -27,8 +27,6 @@ static int iommu_populate_page_table(struct domain *d); * value may contain: * * off|no|false|disable Disable IOMMU (default) - * pv Enable IOMMU for PV domains - * no-pv Disable IOMMU for PV domains (default) * force|required Don't boot unless IOMMU is enabled * workaround_bios_bug Workaround some bios issue to still enable VT-d, don't guarantee security @@ -40,7 +38,6 @@ static int iommu_populate_page_table(struct domain *d); */ custom_param("iommu", parse_iommu_param); bool_t __read_mostly iommu_enabled = 1; -bool_t __read_mostly iommu_pv_enabled; bool_t __read_mostly force_iommu; bool_t __read_mostly iommu_verbose; bool_t __read_mostly iommu_workaround_bios_bug; @@ -63,10 +60,6 @@ static void __init parse_iommu_param(char *s) if ( !strcmp(s, "off") || !strcmp(s, "no") || !strcmp(s, "false") || !strcmp(s, "0") || !strcmp(s, "disable") ) iommu_enabled = 0; - else if ( !strcmp(s, "pv") ) - iommu_pv_enabled = 1; - else if ( !strcmp(s, "no-pv") ) - iommu_pv_enabled = 0; else if ( !strcmp(s, "force") || !strcmp(s, "required") ) force_iommu = 1; else if ( !strcmp(s, "workaround_bios_bug") ) @@ -294,15 +287,11 @@ int __init iommu_setup(void) if ( !iommu_enabled ) { - iommu_pv_enabled = 0; iommu_snoop = 0; iommu_qinval = 0; iommu_intremap = 0; } printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis"); - if ( iommu_enabled ) - printk("I/O virtualisation for PV guests %sabled\n", - iommu_pv_enabled ? "en" : "dis"); return rc; } diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 1b16f7f392..98ead331a5 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -26,7 +26,7 @@ #include #include -extern bool_t iommu_enabled, iommu_pv_enabled; +extern bool_t iommu_enabled; extern bool_t force_iommu, iommu_verbose; extern bool_t iommu_workaround_bios_bug, iommu_passthrough; extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;